package com.yq.publicproject.service.Impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yq.publicproject.dao.UserInfoMapper;
import com.yq.publicproject.model.UserInfo;
import com.yq.publicproject.service.UserService;

/**  
 * 创建时间：2016-7-23 
 * @author yq  
 * @version 1.0  
 */
@Service("userService")
public class UserServiceImpl implements UserService {

	@Autowired
	private UserInfoMapper userInfoMapper;

	@Override
	public UserInfo getUserById(Long id) {
		return userInfoMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<UserInfo> getUsers() {
//		return userInfoMapper.selectAll();
		return null;
	}

	@Override
	public int insert(UserInfo userInfo) {
		
		int result = userInfoMapper.insert(userInfo);
		
		System.out.println(result);
		return result;
	}

}
